{:Addons::hook('home_index_left_top_outline')}
<div class="wrap_index_l">
<div class="user_app">
{:Addons::hook('home_index_left_top')}
<!-- 用户组件列表 begin -->
	<div class="user_app_top"></div>
    <div class="user_app_box">
  <div class="userinfo">
    	<div class="userpic" onmouseover="this.className='userpic over'" onmouseout="this.className='userpic'" ><span id="my_face"><space uid="mid">{uavatar=b}</space></span>
		<a class="pic" href="{:U('home/account/index')}#face">上传头像</a>
		</div>
  		<div class="user_name">
        	<h2>{$userInfoCache['uname']}<php>Addons::hook('user_name_end', array($mid, &$user_name_end));echo $user_name_end;</php>{$mid|getUserGroupIcon}</h2>
            <php>
            	$user_credit = $userInfoCache['credit'];
            	foreach($user_credit as $k => $v) {
            </php>
           		<p>{$v['alias']}：<a href="{:U('home/Account/credit')}"><span class="cRed">{$v['credit']}</span></a></p>
            <php>
                }
                unset($user_credit);
            </php>
        </div>
  </div>
  {:Addons::hook('home_index_left_avatar_bottom')}
  <!--关注-->
  <div class="user_follow app_line">
  	<span class="lineR"><a href="{:U('home/space/follow',array('type'=>'following', 'uid'=>$mid))}"><strong>{$userInfoCache['following']}</strong><br />关注</a></span>
    <span class="lineR"><a href="{:U('home/space/follow',array('type'=>'follower', 'uid'=>$mid))}"><strong>{$userInfoCache['follower']}</strong><br />粉丝</a></span>
    <span><a href="{:U('home/space/index',array('uid'=>$uid))}"><strong id="miniblog_count">{$userInfoCache['miniNum']}</strong><br />微博</a></span>
  </div>
  <!--关注 end-->
  <div class="celerity_menu app_line">
  	<ul>
    <li><a href="{:U('home/user/index')}" {:getMenuState('user/index')}>我的首页</a></li>
	<li><a href="{:U('home/user/atme')}" {:getMenuState('user/atme')}>@提到我的 
	<span id="app_left_count_atme"><gt name="userCount['atme']" value="0">(<font color="red">{$userCount.atme}</font>)</gt></span>
	</a></li>
    <li><a href="{:U('home/user/collection')}" {:getMenuState('user/collection')}>我的收藏</a></li>
    <li><a href="{:U('home/user/comments')}" {:getMenuState('user/comments')}>我的评论 
    <span id="app_left_count_comment"><gt name="userCount['comment']" value="0">(<font color="red">{$userCount.comment}</font>)</gt></span>
    </a></li>
    <if condition="Addons::requireHooks('home_index_left_tab')">
    	{:Addons::hook('home_index_left_tab', array(&$menu))}
    	<volist name="menu" id="vo">
    		<li><a href="{:U('home/user/' . $vo['act'])}" {:getMenuState('user/' . $key)}>{$vo['name']}</a></li>
    	</volist>
    </if>
  	</ul>
  </div>
    {:Addons::hook('home_index_left_middle')}
    <div class="user_app_list app_line">
        <ul>
        <?php foreach ($ts['user_app'] as $_temp_type => $_temp_apps) { ?>
        <?php foreach ($_temp_apps as $_temp_app) { ?>
            <li>
                <?php if(!$ts['site']['site_appalias_wordwrap']) $_temp_app['app_alias'] = mb_substr($_temp_app['app_alias'],0,4,'UTF8'); ?>
                <?php if($_temp_type == 'local_app' || $_temp_type == 'local_default_app') { ?>
                <a href="<?php echo $_temp_app['app_entry'];?>" class="a14">
                    <img src="<?php echo $_temp_app['icon_url'];?>" />
                    <?php echo $_temp_app['app_alias'];?>
                </a>
                <?php }else { ?>
                <a href="__ROOT__/apps/myop/userapp.php?id=<?php echo $_temp_app['app_id'];?>" class="a14">
                    <img src="http://appicon.manyou.com/icons/<?php echo $_temp_app['app_id'];?>" />
                    <?php echo $_temp_app['app_alias'];?>
                </a>
                <?php }?>
            </li>
        <?php } ?>
        <?php } ?>
        </ul>
    </div>
    
    <div class="app_add app_line">
    <span class="right"><span class="ico_app_manage"></span><a href="{:U('home/Index/editapp')}">管理应用</a></span>
    <span><span class="ico_app_add"></span><a href="{:U('home/Index/addapp')}">添加应用</a></span>
    </div>
    </div>
	<div class="user_app_btm"></div>
    {:Addons::hook('home_index_left_bottom')}
    <php>if (Addons::requireHooks('home_index_left_advert')) {</php>
    	{:Addons::hook('home_index_left_advert', array($ts['ad']['left']))}
    <php>} else {</php>
		<volist name="ts['ad']['left']" id="vo">
	    <div class="ad_left"><div class="ke-post">{$vo.content}</div></div>
		</volist>
    <php>}</php>
	</div>
</div>
    <!-- 用户组件列表 end -->
<php>
function getMenuState($type){
	$type = split('/',$type);
	if( strtolower(MODULE_NAME)==strtolower($type[0]) && ( strtolower(ACTION_NAME)==strtolower($type[1]) || $type[1]=='*') ){
		return 'class="on"';
	}
}
</php>